import request from "@/axios/request";
import url from "@/axios/url";
const { mesUrl, adminUrl, commonserviceUrl } = url();
// 导出url
export const exportUrl = `${mesUrl}mesProdBoxcode/export`;
// 获取子表详情
export function getInfo(id = "") {
  return request({
    url: `${mesUrl}mesProdBoxcode/info/${id}`,
    method: "get",
  });
}
// 获取主表详情
export function getMasterInfo(id = "") {
  return request({
    url: `${mesUrl}mesProdOrder/info/${id}`,
    method: "get",
  });
}
//分页查询
export function getList(params = {}) {
  return request({
    url: `${mesUrl}mesProdBoxcode`,
    method: "get",
    params,
  });
}
//新增
export function rowCreate(data = {}) {
  return request({
    url: `${mesUrl}mesProdBoxcode`,
    method: "post",
    data,
  });
}
//修改
export function rowUpdate(data = {}) {
  return request({
    url: `${mesUrl}mesProdBoxcode`,
    method: "put",
    data,
  });
}
//删除
export function rowDel(id) {
  return request({
    url: `${mesUrl}mesProdBoxcode/${id}`,
    method: "put",
  });
}

// 查询打印条码模板名称列表
export function getBarcodePrintTempList() {
  return request({
    url: `${commonserviceUrl}printTemplate/list`,
    method: "post",
  });
}
// 查询线体编码列表
export function getLineCodeList() {
  return request({
    url: `${adminUrl}dict/type/wms_is_print`,
    method: "get",
  });
}
// 查询 打印标识 1是 0否列表
export function getIsPrintList() {
  return request({
    url: `${adminUrl}dict/type/wms_is_print`,
    method: "get",
  });
}
// 查询 报工标识 1是 0否列表
export function getIsSubmittedList() {
  return request({
    url: `${adminUrl}dict/type/wms_is_print`,
    method: "get",
  });
}